package com.huodongrili.calender.bg;

import com.huodongrili.calender.data.DataPreferences;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class StatusReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
		
		String actionStr = intent.getAction();
		if(actionStr.equals(Intent.ACTION_BOOT_COMPLETED)){
			
			DataPreferences dpf = DataPreferences.getInstance(context.getApplicationContext());
			if(dpf.isWifiSync()){
				context.startService(new Intent(context,ScheduleService.class));
			}

		}

	}

}
